import anthropic
from xxx.infrastructure.external.claude_api import get_anthropic_client
#anthropic.Anthropic(api_key=api_key, base_url=base_url)
client = get_anthropic_client()
#"有哪些资源，哪些tool"
response = client.beta.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1000,
    messages=[{
        "role": "user",
        "content": "2025年上半年有什么aiagent产品"
    }],
    mcp_servers=[{
        "type": "url",
        "url": "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/sse",
        "name": "阿里云百炼_联网搜索",
        "authorization_token": "Bearer sk-ab054819205248a7ba919a3381b"
    }],
    betas=["mcp-client-2025-04-04"]
)
print(response)